package com.xinyiweidai.xinyiweidai.module.my;

import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;

import com.lan.mylibrary.ui.MyTitle;
import com.xinyiweidai.xinyiweidai.R;
import com.xinyiweidai.xinyiweidai.base.BaseActivity;
/**
 * class:   QuestionActivity
 * data：   2018/9/28  18:14
 * author:  LanX
 * Description:  常见问题
 *
 */
public class QuestionActivity extends BaseActivity {


    private CheckBox checkbox_question_1;
    private TextView tv_question_1;
    private CheckBox checkbox_question_2;
    private TextView tv_question_2;
    private CheckBox checkbox_question_3;
    private TextView tv_question_3;
    private CheckBox checkbox_question_4;
    private TextView tv_question_4;
    private CheckBox checkbox_question_5;
    private TextView tv_question_5;
    private CheckBox checkbox_question_6;
    private TextView tv_question_6;
    private CheckBox checkbox_question_7;
    private TextView tv_question_7;
    private CheckBox checkbox_question_8;
    private TextView tv_question_8;
    private CheckBox checkbox_question_9;
    private TextView tv_question_9;
    private CheckBox checkbox_question_10;
    private TextView tv_question_10;
    private CheckBox checkbox_question_11;
    private TextView tv_question_11;
    private CheckBox checkbox_question_12;
    private TextView tv_question_12;
    private CheckBox checkbox_question_13;
    private TextView tv_question_13;



    @Override
    protected int getLayoutId() {
        return R.layout.activity_question;
    }


    @Override
    protected void initToolBar() {
        new MyTitle(this, R.drawable.ic_back, "常见问题", 0, true);
    }


    @Override
    protected void initView(Bundle savedInstanceState) {
        checkbox_question_1 = (CheckBox) findViewById(R.id.checkbox_question_1);
        checkbox_question_2 = (CheckBox) findViewById(R.id.checkbox_question_2);
        checkbox_question_3 = (CheckBox) findViewById(R.id.checkbox_question_3);
        checkbox_question_4 = (CheckBox) findViewById(R.id.checkbox_question_4);
        checkbox_question_5 = (CheckBox) findViewById(R.id.checkbox_question_5);
        checkbox_question_6 = (CheckBox) findViewById(R.id.checkbox_question_6);
        checkbox_question_7 = (CheckBox) findViewById(R.id.checkbox_question_7);
        checkbox_question_8 = (CheckBox) findViewById(R.id.checkbox_question_8);
        checkbox_question_9 = (CheckBox) findViewById(R.id.checkbox_question_9);
        checkbox_question_10 = (CheckBox) findViewById(R.id.checkbox_question_10);
        checkbox_question_11 = (CheckBox) findViewById(R.id.checkbox_question_11);
        checkbox_question_12 = (CheckBox) findViewById(R.id.checkbox_question_12);
        checkbox_question_13 = (CheckBox) findViewById(R.id.checkbox_question_13);
        tv_question_1 = (TextView) findViewById(R.id.tv_question_1);
        tv_question_2 = (TextView) findViewById(R.id.tv_question_2);
        tv_question_3 = (TextView) findViewById(R.id.tv_question_3);
        tv_question_4 = (TextView) findViewById(R.id.tv_question_4);
        tv_question_5 = (TextView) findViewById(R.id.tv_question_5);
        tv_question_6 = (TextView) findViewById(R.id.tv_question_6);
        tv_question_7 = (TextView) findViewById(R.id.tv_question_7);
        tv_question_8 = (TextView) findViewById(R.id.tv_question_8);
        tv_question_9 = (TextView) findViewById(R.id.tv_question_9);
        tv_question_10 = (TextView) findViewById(R.id.tv_question_10);
        tv_question_11 = (TextView) findViewById(R.id.tv_question_11);
        tv_question_12 = (TextView) findViewById(R.id.tv_question_12);
        tv_question_13 = (TextView) findViewById(R.id.tv_question_13);
    }


    @Override
    protected void addClickEvent() {
        checkbox_question_1.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_1.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_2.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_2.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_3.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_3.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_4.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_4.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_5.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_5.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_6.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_6.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_7.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_7.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_8.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_8.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_9.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_9.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_10.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_10.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_11.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_11.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_12.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_12.setVisibility(checked? View.VISIBLE:View.GONE));
        checkbox_question_13.setOnCheckedChangeListener((compoundButton, checked) -> tv_question_13.setVisibility(checked? View.VISIBLE:View.GONE));
    }
}
